Skip to content

[Feature] Add the option to autoplay animated images#6166

Merged
bmarty merged 5 commits intoelement-hq:developfrom
networkException:autoplay-animated-images
May 30, 2022
Merged

[Feature] Add the option to autoplay animated images#6166
bmarty merged 5 commits intoelement-hq:developfrom
networkException:autoplay-animated-images

Conversation

@networkException
Copy link
Contributor

@networkException networkException commented May 26, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other:

Content

This pull request adds a new switch to the preferences, allowing users to enable autoplaying of animated images in their room timeline.

Motivation and context

This feature is already present in element-web and was commonly requested by the community:

The pull request resolves #1160, resolves #5094

Screenshots / GIFs

Before After
autoplay disabled autoplay enabled

Tests

  • Send a non animated image, an animated image and a video in to a room
  • Verify that the animated image animates only when the setting is enabled
  • Check that the video retains it's play button and the animated image hides the play button when autoplaying

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 12 x86_64, Android 5 x86_64

Checklist

networkException added a commit to networkException/element-android that referenced this pull request May 26, 2022
Signed-off-by: networkException <git@nwex.de>
@networkException networkException force-pushed the autoplay-animated-images branch from 272cec1 to de40100 Compare May 26, 2022 18:58
@ouchadam ouchadam added the Z-Community-PR Issue is solved by a community member's PR label May 27, 2022
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.
LGTM, just a small typo to fix.
Did not run the code though.

networkException added a commit to networkException/element-android that referenced this pull request May 30, 2022
Signed-off-by: networkException <git@nwex.de>
@networkException networkException force-pushed the autoplay-animated-images branch from de40100 to 792907d Compare May 30, 2022 16:54
This patch adds a new switch to VectorPreferences, the vector settings
preferences view and various classes propergating the set value of the
switch into parts of the application touched by the following patches.

Signed-off-by: networkException <git@nwex.de>
This patch adds the messageType field to MessageInformationData,
containing a nullable string representation of the message event's type.

Signed-off-by: networkException <git@nwex.de>
This patch removes dontAnimate() in the createGlideRequest() builder
conditionally depending on the user's animated image autoplay
preferences.

Resolves element-hq#1160, element-hq#5094

Signed-off-by: networkException <git@nwex.de>
This patch updates the logic checking whether to show the
playContentView to not show it when an animated image message would
autoplay its animation.

Signed-off-by: networkException <git@nwex.de>
Signed-off-by: networkException <git@nwex.de>
@networkException networkException force-pushed the autoplay-animated-images branch from 792907d to fedc637 Compare May 30, 2022 18:05
<string name="settings_chat_effects_title">Show chat effects</string>
<string name="settings_chat_effects_description">Use /confetti command or send a message containing ❄️ or 🎉</string>
<string name="settings_autoplay_animated_images_title">Autoplay animated images</string>
<string name="settings_autoplay_animated_images_summary">Play animated images in the timeline as soon as they are visible</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with this wording. Wording on Web is Autoplay GIFs:

image

We may iterate later

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast update!

@bmarty bmarty enabled auto-merge May 30, 2022 18:14
@bmarty bmarty merged commit 5de6771 into element-hq:develop May 30, 2022
piersonleo pushed a commit to piersonleo/element-android that referenced this pull request Jun 7, 2022
Signed-off-by: networkException <git@nwex.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow option to autoplay GIF images Add option to autoplay GIF

3 participants